package com.mario.nanjing.ai.controller;

import com.mario.nanjing.ai.service.ChatAssistant;
import dev.langchain4j.model.chat.ChatModel;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author MarioZzz
 * @create 2025-08-01 13:47
 */
@RestController()
@RequestMapping("/lc4j/high1")
public class HighApiController {

    @Resource
    private ChatModel chatModelQwen;

    @Resource
    private ChatAssistant chatAssistant;

    @GetMapping(value = "/high1")
    public String highApi(@RequestParam(value = "prompt", defaultValue = "说几句德语") String prompt) {
//        ChatAssistant chatAssistant = AiServices.create(ChatAssistant.class, chatModelQwen);
        return chatAssistant.chat(prompt);
    }
}
